Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ§‘β€πŸ’» login command - print selected username to avoid ambiguity #137

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

zeralight
Copy link
Contributor

@zeralight zeralight commented Jul 16, 2024

Currently, the default username picked up by the tool isn't printed and in some cases the selected one is not the expected one by the user.

this PR addresses the ambiguity by printing explicitly the resolved user.

The behaviour is similar to most cli apps:

$ cl login
Please enter your user name [default_user_name]: input_user

If the user enters empty string, then default_user_name is used instead of input_user.

@zeralight zeralight marked this pull request as draft July 16, 2024 12:49
This will help preventing an unexpected username saved in the store.

The behaviour is similar to most cli apps:

```
$ cl login
Please enter your user name [default_user_name]: user_input
```
If the user enters empty string, then `default_user_name` is used instead
of `user_input`.
@zeralight zeralight marked this pull request as ready for review July 31, 2024 13:51
Copy link
Collaborator

@bhou bhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep the backward compability to support the [PREFIX]_USERNAME as the login user if exits

cmd/login.go Outdated Show resolved Hide resolved
@zeralight zeralight requested a review from bhou August 7, 2024 07:41
@bhou bhou merged commit 14af632 into criteo:main Aug 8, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants